import https from '@/plugins/luch-request_0.0.7/request'

// 获取配置
export const getConfig = data => {
	return https.get('/apihkds/api/init/config', data)
}

export const getCode = data => {
	return https.post('/apihkds/api/misc/sms/send', data)
}

// 获取微信二维码
export const getWxQrCode = data => {
	return https.post('/apihkds/api/mini/getMiniRedirectQrcode', data)
}

// 小程序码获取地址
export const getWxQrCodeQuery = data => {
	return https.post('/apihkds/api/mini/getMiniQrcodeUrl', data)
}

export const wechatBack = data => {
	return https.get('/apihkds/api/oauth/callback', data)
}

export const checkLogin = data => {
	return https.post('/apihkds/api/user/checkLogin', data, {}, { hideError: true })
}

export const loginAll = data => {
	return https.post('/apihkds/api/user/loginOrRegister', data)
}

export const getAccountList = data => {
	return https.get('/apihkds/api/user/getAccountList', data)
}

export const uploadPic = data => {
	return https.post('/apihkds/api/uploads/image', data)
}

export const getArea = data => {
	return https.get('/apihkds/api/misc/getdata/region_new', data)
}
export const wechatJssdk = data => {
	return https.post('/apihkds/api/wechat/jssdk', data)
}
export const getOptions = param => https.get('/apihkds/api/option/getOptions', param)

// 行为轨迹埋点记录接口
export const getbehavior = data => {
	return https.post('/apihkds/api/hkds/stats/trace/add', data, {}, { hideError: true })
}
// 腾讯地图根据经纬度返回地址
export const geocoder = data => {
	return https.get('/apihkds/api/map/geocoder', data, {}, { hideError: true })
}
// 腾讯地图关键词搜索
export const suggestion = data => {
	return https.get('/apihkds/api/map/suggestion', data, {}, { hideError: true })
}
